package za.ac.lance.dependencyinversionprinciple.violates.model;

/**
 * File Name: Manager.java
 * Version:
 * Description: High level class
 * Package: za.ac.lance.dependencyinversionprinciple.violates
 * Author: Lance
 * Date: Feb 24, 2012
 */
public class Manager
{

    private NormalWorker worker;
    private int managerID;
    //Private variable had to be added when SuperWorker class was added
    private SuperWorker superWorker;

    //Constructor had to be modified when  SuperWorker class was added
    public Manager(NormalWorker worker, int managerID, SuperWorker superWorker)
    {
        this.worker = worker;
        this.managerID = managerID;
        this.superWorker = superWorker;
    }

    public int getManagerID()
    {
        return managerID;
    }

    public void setManagerID(int managerID)
    {
        this.managerID = managerID;
    }

    public NormalWorker getWorker()
    {
        return worker;
    }

    public void setWorker(NormalWorker worker)
    {
        this.worker = worker;
    }

    public void manageNormalWorker()
    {
        worker.work();
    }

    //Private method had to be added when SuperWorker class was added
    public void manageSuperWorking()
    {
        superWorker.work();
    }
}
